$(function(){
	var phone;
	$("#store_get_yzm").click(function(){
		phone = $("#person_phone").val();
		if (phone == null || phone == undefined || phone == '') {
			$("#alert_ts").text("请输入手机号");
			$("#store_get_yzm").attr("data-am-modal","{target: '#my-alert'}");
		} else {
			$("#store_get_yzm").removeAttr("data-am-modal");
			$.ajax({
				type: "POST",
				url: "http://yx.fxtourong.com/V1/Store/sendCode",
				data: {
					token : localStorage.getItem("token"),
					phone : phone
				},
				dataType: "json",
				success: function(data) {
					var code = data.code;
					console.log(code);
					if(code == "1") {
						
					} 
				}
			});
		}
	});
	
});